package com.greenline.pay.biz.dal.schedule.impl;

import java.util.Date;

import com.greenline.pay.biz.dal.base.BaseDAO;
import com.greenline.pay.biz.dal.schedule.TaskLogDAO;
import com.greenline.pay.biz.dal.schedule.dataobject.TaskLogDO;
import com.greenline.pay.biz.dal.schedule.query.TaskLogQuery;


public class TaskLogDAOImpl extends BaseDAO implements TaskLogDAO {

    @Override
    public Long addTaskLog(TaskLogDO taskLog) {
        return (Long) this.getSqlMapClientTemplate().insert("taskLog.insert", taskLog);
    }

    @Override
    public void updateTaskLog(TaskLogDO taskLog) {
        this.getSqlMapClientTemplate().update("taskLog.update", taskLog);
    }

    @Override
    public Date getTaskLogLastTime(String taskType) {
        return (Date) this.getSqlMapClientTemplate().queryForObject("taskLog.getTaskLogLastTime", taskType);
    }

	@Override
	public TaskLogQuery<TaskLogDO> queryTaskLog(TaskLogQuery<TaskLogDO> query) {
		return (TaskLogQuery<TaskLogDO>)this.listByQuery("taskLog.list_by_query", query);
	}
    
}
